package com.xwaiy.xwaiyrpc.fault.retry;

import com.xwaiy.xwaiyrpc.spi.SpiLoader;

/**
 * 重试策略工厂
 * @Author Xwaiy
 * @Date 2025/9/3 15:19
 **/
public class RetryStrategyFactory {

    static {
        SpiLoader.load(RetryStrategy.class);
    }

    // 默认
    private static final RetryStrategy DEFAULT_RETRY_STRATEGY = new NoRetryStrategy();

    public static RetryStrategy getInstance(String key) {
        return SpiLoader.getInstance(RetryStrategy.class,key);
    }
}
